package android;

public class DualNode <T>{

		private DualNode<T> nextNode;
		private DualNode<T> prevNode;
		private T value;
		public DualNode(T val, DualNode<T> prev, DualNode<T> next){
			value = val;
			prevNode = prev;
			nextNode = next;
		}
		public DualNode(){
			this(null,null,null);
		}
		public DualNode(T val,DualNode<T> prev){
			this(val,prev,null);
		}
		public DualNode(DualNode<T> prev){
			this(null,prev,null);
		}
		public DualNode(T val){
			this(val,null,null);
		}
		public DualNode(DualNode<T> prev, DualNode<T> next){
			this(null,prev,next);
		}
		void setPrev(DualNode<T> prev){
			prevNode = prev;
		}
		DualNode<T> getPrev(){
			return prevNode;
		}
		void setNext(DualNode<T> next){
			nextNode = next;
		}
		DualNode<T> getNext(){
			return nextNode;
		}
		void setVal(T val){
			value = val;
		}
		T getVal(){
			return value;
		}
		
}
